package com.example.demo.service.impl;

import com.example.demo.dao.AdminMapper;
import com.example.demo.pojo.Record;
import com.example.demo.pojo.User;
import com.example.demo.service.AdminService;
import com.example.demo.utils.AbsentUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;

    @Override
    public List<Record> selectAllRecord(){
        return adminMapper.selectAllRecord();
    }

    @Override
    public List<AbsentUser> selectAbsentUser(){
        return adminMapper.selectAbsentUser();
    }

    @Override
    public int addUser(User user){
        return adminMapper.addUser(user);
    }

    @Override
    public int updateUser(User user){
        return adminMapper.updateUser(user);
    }

    @Override
    public int makeUserOn(int Uid){
        return adminMapper.makeUserOn(Uid);
    }

    @Override
    public int makeUserOff(int Uid){
        return adminMapper.makeUserOff(Uid);
    }

    @Override
    public String AdminLogin(String Aid){
        return adminMapper.AdminLogin(Aid);
    }

    @Override
    public List<User> selectAllUser(){
        return adminMapper.selectAllUser();
    }

}
